object CollectionOpsDemo {
  def main(args: Array[String]): Unit = {
    val clubs = List(
      ("编程社",35),
      ("文学社",28),
      ("篮球社",42),
      ("话剧社",25)
    )

    val activeClubs = clubs.filter{case (_,count) => count >= 30}

    val clubFormats = activeClubs.map{ case (name,count) =>
      s"$name($count 人)"
    }
    println("活跃社团：")
    clubFormats.foreach(println)
  }

}
